//package com.dlwx.parttimetalent.adapter;
//
//import android.content.Context;
//import android.graphics.Color;
//import android.support.v7.widget.GridLayoutManager;
//import android.support.v7.widget.LinearLayoutManager;
//import android.support.v7.widget.RecyclerView;
//import android.view.View;
//import android.widget.TextView;
//
//import com.dlwx.parttimetalent.R;
//import com.dlwx.parttimetalent.bean.Label1211Bean;
//import com.dlwx.parttimetalent.bean.LabelBean;
//import com.dlwx.parttimetalent.inter.OnRecyclerViewItemClickListener;
//import com.dlwx.parttimetalent.views.PricingDialog;
//import com.github.jdsjlzx.ItemDecoration.GridItemDecoration;
//import com.github.jdsjlzx.interfaces.OnItemClickListener;
//import com.github.jdsjlzx.recyclerview.LRecyclerView;
//import com.github.jdsjlzx.recyclerview.LRecyclerViewAdapter;
//
//import java.util.ArrayList;
//
//import q.rorbin.verticaltablayout.VerticalTabLayout;
//import q.rorbin.verticaltablayout.adapter.TabAdapter;
//import q.rorbin.verticaltablayout.widget.TabView;
//
///**
// * Created by Administrator on 2017/12/11.
// */
//
//public class Label1211Adapter extends BaseMultiAdapter<Label1211Bean> {
//    private Context context;
//    public Label1211Adapter(Context context) {
//        super(context);
//        this.context=context;
//        addItemType(Label1211Bean.ONE, R.layout.item_label1);
//        addItemType(Label1211Bean.TWO, R.layout.item_label2);
//        addItemType(Label1211Bean.THREE, R.layout.item_label3);
//    }
//
//    @Override
//    public void onBindItemHolder(SuperViewHolder holder, int position) {
//        Label1211Bean item = getDataList().get(position);
//        switch (item.getItemType()) {
//            case Label1211Bean.ONE:
//                bindOne(holder,item);
//                break;
//            case Label1211Bean.TWO:
//                bindTwo(holder,item);
//                break;
//            case Label1211Bean.THREE:
//                bindThree(holder,item);
//                break;
//            default:
//                break;
//        }
//    }
//
//    private void bindThree(SuperViewHolder holder, Label1211Bean item) {
//
//    }
//
//    private void bindTwo(SuperViewHolder holder, Label1211Bean item) {
//        VerticalTabLayout tablayout=holder.getView(R.id.tablayout);
//        LRecyclerView recyclerView=holder.getView(R.id.recyclerView);
//        final  ArrayList<LabelBean> mDatas1 = new ArrayList<LabelBean>();
//        for(int i=0;i<8;i++){
//            LabelBean bean=new LabelBean();
//            bean.setId(i);
//            bean.setLabelName("标签"+i);
//            mDatas1.add(bean);
//        }
//        tablayout.setTabAdapter(new TabAdapter() {
//            @Override
//            public int getCount() {
//                return mDatas1.size();
//            }
//
//            @Override
//            public TabView.TabBadge getBadge(int position) {
//                return null;
//            }
//
//            @Override
//            public TabView.TabIcon getIcon(int position) {
//                return null;
//            }
//
//            @Override
//            public TabView.TabTitle getTitle(int position) {
//                return new TabView.TabTitle.Builder()
//                        .setContent(mDatas1.get(position).getLabelName())
//                        .setTextColor(Color.BLACK, Color.BLACK)
//                        .setTextSize(14)
//                        .build();
//            }
//
//            @Override
//            public int getBackground(int position) {
//                return 0;
//            }
//        });
//        recyclerView.setLayoutManager(new LinearLayoutManager(context));
//        LabelAdapter mAdapter = new LabelAdapter(context);
//        ArrayList<LabelBean> mDatas = new ArrayList<LabelBean>();
//        for(int i=0;i<20;i++){
//            LabelBean bean=new LabelBean();
//            bean.setId(i);
//            bean.setLabelName("标签"+i);
//            mDatas.add(bean);
//        }
//        mAdapter.setDataList(mDatas);
//        LRecyclerViewAdapter lRecyclerViewAdapter=new LRecyclerViewAdapter(mAdapter);
//        recyclerView.setHasFixedSize(true);
//        recyclerView.setAdapter(lRecyclerViewAdapter);
//        recyclerView.setLoadMoreEnabled(false);
//        recyclerView.setPullRefreshEnabled(false);
//        lRecyclerViewAdapter.setOnItemClickListener(new OnItemClickListener() {
//            @Override
//            public void onItemClick(View view, int position) {
//                PricingDialog dialog=new PricingDialog(context);
//                dialog.show();
//            }
//        });
//    }
//
//    private void bindOne(SuperViewHolder holder, Label1211Bean item) {
//        RecyclerView recyclerView = holder.getView(R.id.recyclerView);
//        TextView Tvtitle = holder.getView(R.id.tv_title);
//        Tvtitle.setText(item.getTitle());
//        GridLayoutManager manager = new GridLayoutManager(context, 5);
//        manager.setAutoMeasureEnabled(true);
//        recyclerView.setLayoutManager(manager);
//        ArrayList<LabelBean> mDatas = new ArrayList<LabelBean>();
//        for(int i=0;i<20;i++){
//            LabelBean bean=new LabelBean();
//            bean.setId(i);
//            bean.setLabelName("标签"+i);
//            mDatas.add(bean);
//        }
//        LabelItemAdapter mAdapter = new LabelItemAdapter(context,mDatas);
////        LRecyclerViewAdapter lRecyclerViewAdapter=new LRecyclerViewAdapter(mAdapter);
//        //divider
//        GridItemDecoration divider = new GridItemDecoration.Builder(context)
//                .setHorizontal(R.dimen.size_4)
////                 .setVertical(R.dimen.size_4)
//                .setColorResource(R.color.white)
//                .build();
//        recyclerView.setHasFixedSize(false);
////        recyclerView.addItemDecoration(divider);
//        recyclerView.setAdapter(mAdapter);
////        recyclerView.setLoadMoreEnabled(false);
////        recyclerView.setPullRefreshEnabled(false);
//        mAdapter.setOnItemClickListener(new OnRecyclerViewItemClickListener<LabelBean>() {
//            @Override
//            public void onItemClick(View view, LabelBean data) {
//                PricingDialog dialog=new PricingDialog(context);
//                dialog.show();
//            }
//        });
////        lRecyclerViewAdapter.setOnItemClickListener(new OnItemClickListener() {
////            @Override
////            public void onItemClick(View view, int position) {
//////                LabelBean bean = mAdapter.getDataList().get(position);
//////                mListener.onFragmentInteraction(null);
////                PricingDialog dialog=new PricingDialog(context);
////                dialog.show();
////            }
////        });
//    }
//}
